<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var a = [1,2,3,4,5];
        // should output [2,4,6,8,10]
        for(var i=0;i<a.length;i++){
            a[i]=a[i]*2;
        }
        console.log(a)
    </script>
</head>
<body>

</body>
</html>